

<template>
  <el-row class='PaginationTop' justify='center'  align='middle'>
    <el-col :span='6'  style='margin-right: 20px'>
      <el-pagination style='justify-content: center;margin-top: 20px'
                     v-model:page-size='inLimit'
                     v-model:current-page='inPage'
                     layout=' sizes,prev, pager, next,total'
                     :total='inCount'
                     @update:current-page="load"
                     @update:page-size="load"
                      >
      </el-pagination>
    </el-col>
  </el-row>
</template>
<script setup>
import {onMounted, onUpdated, ref, watch} from "vue";
import {defineEmits} from 'vue'
const emit = defineEmits(['init'])
const  prop=defineProps({
  limit:Number,
  page:Number,
  count:Number
})
const inLimit=ref()
const inPage=ref()
const inCount=ref()
onUpdated(()=>{
  inLimit.value=prop.limit
  inPage.value=prop.page
  inCount.value=prop.count
})
const load=()=>{
  emit("init",inPage.value,inLimit.value)
}
</script>
<style scoped>

</style>